<%--&lt;%&ndash;--%>
<%--  Created by IntelliJ IDEA.--%>
<%--  User: lenovo--%>
<%--  Date: 2024/12/17--%>
<%--  Time: 9:22--%>
<%--  To change this template use File | Settings | File Templates.--%>
<%--&ndash;%&gt;--%>
<%--<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>--%>
<%--<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>--%>
<%--<style>--%>
<%--    * {--%>
<%--        background-color: #9acfea;--%>
<%--    }--%>
<%--</style>--%>

<%--<div class="data_list">--%>
<%--    <h1>密码修改</h1>--%>

<%--    <div>--%>
<%--        <form method="post" action="common.action?action=sureUpPassword" onsubmit="return checkThisFile()">--%>
<%--            <table class="table table-striped table-bordered table-hover datatable">--%>
<%--                <thead>--%>
<%--                <tr height="15px">--%>
<%--                    <th style="text-align: center;">输入新密码：</th>--%>
<%--                    <th style="text-align: center;"><input name="userPassword" id="userPassword" type="password" width="400px"--%>
<%--                                                           height="26px"--%>
<%--                                                           style="border-bottom-right-radius: 3px"></th>--%>
<%--                </tr>--%>
<%--                <tr style="width: 500px">--%>
<%--                    <th style="text-align: center;">再次输入密码：</th>--%>
<%--                    <th style="text-align: center;width: 70%"><input id="a" type="password" width="400px" height="26px";style="border-bottom-right-radius: 3px">--%>
<%--                    </th>--%>
<%--                </tr>--%>
<%--                <tr style="width: 500px">--%>
<%--                    <td></td>--%>
<%--                    <td>--%>
<%--                        <input type="submit" value="提交">--%>
<%--                    </td>--%>

<%--                </tr>--%>
<%--                <tr style="width: 500px">--%>
<%--                    <td></td>--%>
<%--                    <td>--%>
<%--                        <span style="color: #dd1144" id="error"></span>--%>
<%--                    </td>--%>

<%--                </tr>--%>
<%--                </thead>--%>
<%--            </table>--%>
<%--        </form>--%>

<%--        <script>--%>
<%--            function checkThisFile() {--%>
<%--                let userPassword = document.getElementById("userPassword").value;--%>
<%--                let a = document.getElementById("a").value;--%>
<%--                // (stuCode == null || stuCode == "")--%>
<%--                if ((a==null||a.trim()=="")||(userPassword==null||userPassword.trim()=="")) {--%>
<%--                    document.getElementById("error").innerHTML = "请输入两次完整密码";--%>
<%--                    return false;--%>
<%--                } else if(a!=userPassword){--%>
<%--                    document.getElementById("error").innerHTML = "两次密码不一致";--%>
<%--                    return false;--%>
<%--                }else{--%>
<%--                    return true;--%>
<%--                }--%>


<%--            }--%>
<%--        </script>--%>
<%--    </div>--%>
<%--    <div align="center"><font color="red"></font></div>--%>
<%--</div>--%>





<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2024/12/17
  Time: 9:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>密码修改</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background: linear-gradient(to right, #ff7e5f, #feb47b);
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }
        .container {
            background: rgba(255, 255, 255, 0.8);
            padding: 40px;
            border-radius: 10px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            width: 400px;
            text-align: center;
        }
        h1 {
            color: #333;
        }
        .input-group {
            margin-bottom: 20px;
        }
        .input-group label {
            display: block;
            margin-bottom: 5px;
            color: #555;
        }
        .input-group input {
            width: 100%;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 5px;
        }
        .input-group input:focus {
            border-color: #80bdff;
            outline: none;
            box-shadow: 0 0 0 .2rem rgba(0,123,255,.25);
        }
        .btn {
            background-color: #ff7e5f;
            color: white;
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }
        .btn:hover {
            background-color: #feb47b;
        }
        .error {
            color: red;
            margin-top: 10px;
            font-size: 14px;
        }
    </style>
</head>
<body>
<div class="container">
    <h1>密码修改</h1>
    <form method="post" action="common.action?action=sureUpPassword" onsubmit="return checkThisFile()">
        <div class="input-group">
            <label for="userPassword">输入新密码：</label>
            <input type="password" id="userPassword" name="userPassword">
        </div>
        <div class="input-group">
            <label for="confirmPassword">再次输入密码：</label>
            <input type="password" id="confirmPassword" name="confirmPassword">
        </div>
        <button type="submit" class="btn">提交</button>
        <div class="error" id="error"></div>
    </form>
</div>
<script>
    function checkThisFile() {
        let userPassword = document.getElementById("userPassword").value;
        let confirmPassword = document.getElementById("confirmPassword").value;
        if ((confirmPassword.trim() === "") || (userPassword.trim() === "")) {
            document.getElementById("error").textContent = "请输入两次完整密码";
            return false;
        } else if (confirmPassword !== userPassword) {
            document.getElementById("error").textContent = "两次密码不一致";
            return false;
        } else {
            return true;
        }
    }
</script>
</body>
</html>


